package edu.kaist.cs408.pof.common.service;

import edu.kaist.cs408.pof.common.model.DishVo;
import edu.kaist.cs408.pof.common.model.RestaurantVo;
import edu.kaist.cs408.pof.common.model.TalkVo;
import org.bson.types.ObjectId;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: duyleekun
 * Date: 5/9/12
 * Time: 4:35 AM
 * To change this template use File | Settings | File Templates.
 */

@Path("/restaurant")
public interface RestaurantSvc {


	@GET
	@Produces(MediaType.APPLICATION_JSON)
	List<RestaurantVo> get(@QueryParam("status") Integer open);

	@POST
	@Path("{restaurant}/adddish")
	@Produces(MediaType.APPLICATION_JSON)
	@Consumes(MediaType.APPLICATION_JSON)
	RestaurantVo addDish(DishVo newDish, @PathParam("restaurant") ObjectId restaurant);

	@POST
	@Path("{restaurant}/rate")
	@Produces(MediaType.APPLICATION_JSON)
	public RestaurantVo rate(@PathParam("restaurant") ObjectId restaurant, @QueryParam("score") int score);

	@POST
	@Path("{restaurant}/talk")
	@Produces(MediaType.APPLICATION_JSON)
	@Consumes(MediaType.APPLICATION_JSON)
	public RestaurantVo postTalk(@PathParam("restaurant") ObjectId restaurant, @QueryParam("user") ObjectId user, TalkVo talk);
}
